//
//  UIView+Iori.h
//  IoriLibrary
//
//  Created by Jobs on 9/21/16.
//  Copyright © 2016 Iori. All rights reserved.
//

#import <UIKit/UIKit.h>

#define DEVICE_WIDTH        [UIScreen mainScreen].bounds.size.width
#define DEVICE_HEIGHT       [UIScreen mainScreen].bounds.size.height

#define AUTO_RESIZE(w) (((w) *(DEVICE_WIDTH/320.0f)))
#define AutoXPosition(w) (IPHONE_WIDTH-AutoReSize(w))/2

@interface UIView (Iori)

-(void)bezierCorner:(NSInteger)radius;
-(void)TransitionAnimate:(NSInteger)tag subType:(NSInteger)typeID duration:(CFTimeInterval)duration timeingFunction:(CAMediaTimingFunction*)timeing;
-(void)RotationZ:(NSInteger)degrees;

-(CGPoint)getViewCenter;
-(CGPoint)getViewCenterInView:(UIView*)parentView;

// Duplicate UIView
+ (UIView*)duplicate:(UIView*)view;
+(UIImageView*)duplicateImageView:(UIImageView*)view;
+(UIView*)duplicateBetContainer:(UIView *)view;

-(void)showInView:(UIView *)view fromRect:(CGRect)rect;
-(void) dismissAnimated:(BOOL)flag;

@end
